<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <a :href="url">百度</a>
        <img @click="show()" :src="pics[i]" width="400" height="300" alt="">
    </div>

    <script src="/js/js/vue.js"></script>

    <script>

        var vm = new Vue({
            el: '#app',
            data: {
                url: 'http://www.baidu.com',
                pics:[
                    '/image/wallhaven-1pwq23_2560x1600.png',
                    '/image/wallhaven-85po71_2560x1600.png',
                    '/image/wallhaven-exrj5r_2560x1600.png'
                ],
                i:0
            },
            methods: {
                show(){
                    this.i= ++this.i % 3;
                }
            }
        })
    </script>
</body>
</html>
